package com.hui.stock.service;


import com.hui.stock.pojo.domain.RolesInfoDomain;
import com.hui.stock.pojo.domain.UserInfoDomain;
import com.hui.stock.pojo.entity.SysUser;
import com.hui.stock.vo.req.AddUserReqVo;
import com.hui.stock.vo.req.LoginReqVo;
import com.hui.stock.vo.req.UpdateUserRoleReqVo;
import com.hui.stock.vo.req.UserPageInfoReqVo;
import com.hui.stock.vo.resp.LoginRespVo;
import com.hui.stock.vo.resp.PageResult;
import com.hui.stock.vo.resp.R;

import javax.servlet.http.HttpSession;
import java.util.List;
import java.util.Map;

public interface UserService {
    /**
     *根据用户名查询用户
     * @param userName
     * @return
     */
    SysUser getUserByUserName(String userName);

    R<LoginRespVo> login(LoginReqVo vo);

    R<Map> getCaptchaCode();

    R<PageResult> queryUserPageInfo(UserPageInfoReqVo userPageInfoReqVo);

    R addUser(AddUserReqVo addUserReqVo, HttpSession session);

    R<RolesInfoDomain> getRolesByUserId(Long userId);

    R updateUserRoles(UpdateUserRoleReqVo userPageInfoReqVo);

    R deleteUserByUserID(List<Long> userIds);

    R<UserInfoDomain> getUserInfoByUserId(Long userId);

    R updateUserInfo(SysUser sysUser, HttpSession session);
}
